#include<iostream>
#include<string>

using namespace std;

string opers = "+-*/%" ;
class task
{
private:
int _data1;
int _data2;
char _op;
int _exitcode;
int _retsult;
public:
    task(int data1,int data2,char op)
    :_data1(data1),_data2(data2),_op(op),_exitcode(0),_retsult(0)
    {}
    ~task()
    {}

    void run()
    {
        switch(_op)
        {
            case '+':
                _retsult = _data1 + _data2;
                break;
            case '-':
                _retsult = _data1 - _data2;
                break;         
            case '*':
                _retsult = _data1 * _data2;
                break;
            case '/':
            {
                if(_data2 == 0){
                    _exitcode = 1;
                    break;
                } 
                _retsult = _data1 / _data2;
            }
            break;
            case '%':
                _retsult = _data1 % _data2;
                break;
            default:
                _exitcode = 2;break;
        }
    }

    string Getresult()
    {
        string ret = to_string(_data1);
        ret += _op;
        ret += to_string(_data2);
        ret += '=';
        ret += to_string(_retsult);
        ret += '[';
        ret += to_string(_exitcode);
        ret += ']';

        return ret;
    }

    string Gettask()
    {
        string ret = to_string(_data1);
        ret += _op;
        ret += to_string(_data2);


        return ret;
    }

};